<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>数据字典</title>
    <!--百度统计-->
    <script src="/blog/js/statistics.js"></script>
    <!--layUI的css-->
    <link rel="stylesheet" href="/layui/css/layui.css">
    <style>
        body{
            width: 100%!important;
            height: 100%!important;
            background-image: url("https://z3.ax1x.com/2021/08/28/hlyVER.jpg");
            background-size: 100% auto;
            background-repeat: repeat;
        }
    </style>
    <!--layUI的js-->
    <script src="/layui/layui.js"></script>
    <script>
        layui.use(['layer'], function () {
            layer.load(1);
        })
    </script>
</head>
<body>

<div class="layui-form">
    <div class="layui-form-item"></div>
    <div class="layui-form-item">
        <div class="layui-inline"></div>
        <div class="layui-inline">
            <div class="layui-btn-group">
                <button id="add_btn" type="button" class="layui-btn layui-btn-sm">
                    <i class="layui-icon">&#xe654;</i>
                </button>
                <button id="edit_btn" type="button" class="layui-btn layui-btn-sm layui-bg-blue">
                    <i class="layui-icon">&#xe642;</i>
                </button>
                <button id="delete_btn" type="button" class="layui-btn layui-btn-sm layui-bg-red">
                    <i class="layui-icon">&#xe640;</i>
                </button>
            </div>
        </div>

        <dic class="layui-inline">
            <label class="layui-form-label">操作字典值</label>
            <div class="layui-input-inline">
                <input type="checkbox" name="switch" lay-skin="switch" lay-text="开启|关闭" checked>
            </div>
        </dic>

    </div>
</div>

<table style="margin-bottom: 5em;opacity: 0.7" class="layui-table" layui-skin="line" lay-even lay-size="lg">
    <colgroup>
        <col width="150">
        <col width="200">
        <col>
    </colgroup>
    <thead>
    <tr>
        <th>字典类型</th>
        <th>type_name</th>
        <th>type_description</th>
        <th>字典值</th>
        <th>value_name</th>
        <th>value</th>
    </tr>
    </thead>
    <tbody id="dic_list">
    <!--<tr>
        <td><input type="checkbox" name="dic_type" dic_type_id="" dic_value_id="" value=""></td>
        <td>type_name</td>
        <td>type_description</td>
        <td><input type="radio" name="dic_value" dic_type_id="" dic_value_id="" value=""></td>
        <td>value_name</td>
        <td>value</td>
    </tr>-->
    </tbody>
</table>


<!--增加和修改分类的layer-->
<form id="add_edit_type_layer" hidden class="layui-form layui-form-pane">
    <div class="layui-form-item">
        <label class="layui-form-label">类型名</label>
        <div class="layui-input-block">
            <input type="text" name="name" required lay-verify="required" placeholder="字典类型名..." autocomplete="off"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">描述</label>
        <div class="layui-input-block">
            <input type="text" name="description" required lay-verify="required" placeholder="描述..." autocomplete="off"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block" style="text-align: right">
            <button class="layui-btn" lay-submit lay-filter="type_form_submit">提交</button>
            <button type="reset" class="layui-btn layui-btn-primary" id="reset_btn">重置</button>
        </div>
    </div>
</form>

<!--增加和修改字典值的layer-->
<form id="add_edit_value_layer" hidden class="layui-form layui-form-pane">
    <div class="layui-form-item">
        <label class="layui-form-label">字典类型</label>
        <div class="layui-input-block">
            <select name="dic_type_id" lay-verify="required">
                <option value=""></option>
                <!--<option value="1">recommend_level</option>
                <option value="2">create_flag</option>-->
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">值名</label>
        <div class="layui-input-block">
            <input type="text" name="value_name" required lay-verify="required" placeholder="字典值名(用于展示)..."
                   autocomplete="off"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">值</label>
        <div class="layui-input-block">
            <input type="text" name="value" required lay-verify="required" placeholder="值(用于填充其他表的相应字段)..."
                   autocomplete="off"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block" style="text-align: right">
            <button class="layui-btn layui-btn-radius" lay-submit lay-filter="value_form_submit">提交</button>
            <button type="reset" class="layui-btn layui-btn-primary layui-hide" id="value_reset_btn">重置</button>
        </div>
    </div>
</form>

</body>
</html>

<!--jQuery-->
<script src="/jquery-3.6.0.min.js"></script>
<!--引入自己的js-->
<script src="/settings/js/dic.js"></script>